1500 |
How can I add a Zero-Lenght bar
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); (var_Columns.Add("Duration") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,258); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.AllowLinkBars = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h1 = var_Items.AddItem("M1"); var_Items.AddBar(h1,"Milestone",Convert.ToDateTime("9/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1499 |
Can I use bars like Milestone (Zero-Length bar) in SchedulePDM
// BarResizing event - Occurs when a bar is moving or resizing. private void axG2antt1_BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e) { System.Diagnostics.Debug.Print( axG2antt1.Items.SchedulePDM(e.item,e.key).ToString() ); } //this.axG2antt1.BarResizing += new AxEXG2ANTTLib._IG2anttEvents_BarResizingEventHandler(this.axG2antt1_BarResizing); axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); (var_Columns.Add("Duration") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,258); EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("%3",null); var_ConditionalFormat.Bold = true; var_ConditionalFormat.ApplyTo = EXG2ANTTLib.FormatApplyToEnum.exFormatToItems; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat1 = axG2antt1.ConditionalFormats.Add("%3 = 0",null); var_ConditionalFormat1.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(196,196,196)); var_ConditionalFormat1.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x3; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.Bars.Add("Task:Split").Shortcut = "Task"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h1 = var_Items.AddItem("M1"); var_Items.AddBar(h1,"Milestone",Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); int h2 = var_Items.AddItem("T1"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEndInclusive,Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.AddItem("T2"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h3,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEndInclusive,Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h3,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.AddLink("L2",h1,"",h3,""); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,5); int h4 = var_Items.AddItem("M3"); var_Items.AddBar(h4,"Milestone",Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h4,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,false); var_Items.AddLink("L3",h1,"",h4,""); var_Items.set_Link("L3",EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,5); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1498 |
How can I prevent vertical scrolling when user clicks the overview part of the control
|
1497 |
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (recommended for bars with exBarKeepWorkingCount ) What I can do
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.ShowEmptyBars = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEndInclusive,var_Items.get_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarStart)); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEndInclusive,Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1496 |
How can I display the end date to be the last visible date of task, instead the next day
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { axG2antt1.Items.SchedulePDM(e.item,e.key); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); // BarResizing event - Occurs when a bar is moving or resizing. private void axG2antt1_BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e) { axG2antt1.Items.SchedulePDM(e.item,e.key); } //this.axG2antt1.BarResizing += new AxEXG2ANTTLib._IG2anttEvents_BarResizingEventHandler(this.axG2antt1_BarResizing); axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.HeaderHeight = 36; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); EXG2ANTTLib.Column var_Column = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column.HTMLCaption = "<b>End</b><br>Inclusive"; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add(1.ToString(),null); var_ConditionalFormat.Bold = true; var_ConditionalFormat.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x2; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.Bars.Add("Task:Split").Shortcut = "Task"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddLink("link",h1,"",h2,""); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1495 |
How do I hide the selection
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.SelForeColor = axG2antt1.ForeColor; axG2antt1.SelBackColor = axG2antt1.BackColor; axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Format") as EXG2ANTTLib.Column); var_Column.FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00" + "00FF>+'+(value format '2|.|3|,' ): '0.00') )"; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(10); var_Items.AddItem(-8); axG2antt1.EndUpdate(); |
1494 |
How do I access the cells, or how do I get the values in the columns
EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("C1"); var_Columns.Add("C2"); var_Columns.Add("C3"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item 1"); var_Items.set_CellValue(h,1,"SubItem 1.1"); var_Items.set_CellValue(h,2,"SubItem 1.2"); System.Diagnostics.Debug.Print( var_Items.get_CellValue(h,1).ToString() ); |
1493 |
Is there any function I can use to indicate the Now() when using the ComputedFields, CondtionalFormats, ...
(axG2antt1.Columns.Add("Now") as EXG2ANTTLib.Column).ComputedField = "date(``)"; axG2antt1.Items.AddItem(""); |
1492 |
How can I get the start and end points of the bar once the BarResize event occurs
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { System.Diagnostics.Debug.Print( "Start: " ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() ); System.Diagnostics.Debug.Print( "End: " ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() ); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2009",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; axG2antt1.Columns.Add("Types"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/4/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1491 |
My chart displays hours, the question would be if possible to let user resizes the bars up to 1/2 hour, or a half an hour
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.ResizeUnitCount = 30; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.get_Level(1).DrawGridLines = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Task"); var_Items.AddItem("Task"); var_Items.AddItem("Task"); var_Items.AddItem("Task"); var_Items.AddItem("Task"); axG2antt1.EndUpdate(); |
1490 |
How can I show the dates in the title
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.get_Level(0).Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside | EXG2ANTTLib.AlignmentEnum.CenterAlignment; axG2antt1.EndUpdate(); |
1489 |
If I vertically scroll the control the image flows fluently. But when I scroll on the horizontal chart's scrollbar the images only shows after I release the click button. Can I make it scroll fluently like the vertical scrollbar
|
1488 |
How can I programmatically add a bar during the CreateBar event
// CreateBar event - Fired when the user creates a new bar. private void axG2antt1_CreateBar(object sender, AxEXG2ANTTLib._IG2anttEvents_CreateBarEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; object k = var_Items.get_ItemBar(e.item,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount); var_Items.AddBar(e.item,"Order",e.dateStart,e.dateEnd,k,"your text"); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(e.item,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); } //this.axG2antt1.CreateBar += new AxEXG2ANTTLib._IG2anttEvents_CreateBarEventHandler(this.axG2antt1_CreateBar); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarManual; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.Bars.Copy("Task","Order"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(1); var_Items.AddItem(2); var_Items.AddItem(3); axG2antt1.EndUpdate(); |
1487 |
How can I move more bars by code
axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,1); var_Items.set_ItemBar(0,"<A*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,1); var_Items.set_ItemBar(0,"<B*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,1); |
1486 |
How can I move a bar by code
axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,1); |
1485 |
How can I clip the notes to the items zone only
axG2antt1.BeginUpdate(); axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); axG2antt1.AntiAliasing = true; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(null); int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"1",null); EXG2ANTTLib.Notes var_Notes = axG2antt1.Chart.Notes; EXG2ANTTLib.Note var_Note = var_Notes.Add("1",axG2antt1.Items[1],"1","<img>2</img>"); var_Note.set_PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.set_PartBorderSize(EXG2ANTTLib.NotePartEnum.exNoteEnd,0); var_Note.ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd); var_Note.set_PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd,true); var_Note.RelativePosition = 0.5; var_Note.set_PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd,-36); var_Notes.ClipTo = EXG2ANTTLib.NotesClipToEnum.exNotesClipToItems; axG2antt1.EndUpdate(); |
1484 |
How can I put two bars of various types, in the event of conflict do not coincide
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "NewTask"; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Copy("Task","NewTask"); var_Bar1.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar1.OverlaidGroup = "Task"; var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1","A1"); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3","A3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4","A4"); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1483 |
How can I run trigger an event which, after clicking on the item/bar gives the key/name or item id
// MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { int item = axG2antt1.get_ItemFromPoint(-1,-1,column,hit); object key = axG2antt1.Chart.get_BarFromPoint(-1,-1); System.Diagnostics.Debug.Print( "Item:" ); System.Diagnostics.Debug.Print( item.ToString() ); System.Diagnostics.Debug.Print( "Key:" ); System.Diagnostics.Debug.Print( key.ToString() ); System.Diagnostics.Debug.Print( "CellValue(i,0):" ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellValue(item,0).ToString() ); axG2antt1.Items.set_ItemBar(item,key,EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); axG2antt1.EndUpdate(); |
1482 |
How can I change the check-boxes appearance
axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Default") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"XP:Button 3 12"); var_Appearance.Add(2,"XP:Button 3 11"); var_Appearance.Add(3,"XP:Button 3 10"); axG2antt1.set_CheckImage(EXG2ANTTLib.CheckStateEnum.Unchecked,16777216); axG2antt1.set_CheckImage(EXG2ANTTLib.CheckStateEnum.Checked,33554432); axG2antt1.set_CheckImage(EXG2ANTTLib.CheckStateEnum.PartialChecked,50331648); |
1481 |
How can I change the color for the control's split bar (sample 1)
|
1480 |
Is it possible to display ONLY the working hours
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Label = 4096; var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside | EXG2ANTTLib.AlignmentEnum.CenterAlignment; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%hh%>"; var_Level1.Count = 6; var_Chart.UnitWidth = 26; var_Chart.set_PaneWidth(false,0); var_Chart.NonworkingHours = 15728895; var_Chart.ShowNonworkingUnits = false; var_Chart.ShowNonworkingHours = false; |
1479 |
How can I display the end of the day in the chart's header
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Label = 4096; var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside | EXG2ANTTLib.AlignmentEnum.CenterAlignment; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%hh%>"; var_Level1.Count = 6; var_Level1.set_ReplaceLabel("08","<b>8</b> <font ;6>am"); var_Level1.set_ReplaceLabel("14","<b>8</b> <font ;6>pm"); var_Chart.UnitWidth = 26; var_Chart.set_PaneWidth(false,0); var_Chart.NonworkingHours = 15728895; var_Chart.ShowNonworkingUnits = false; var_Chart.ShowNonworkingHours = false; |
1478 |
How can I display the +/- expanding buttons in the chart section
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Indent = 13; axG2antt1.HasButtons = EXG2ANTTLib.ExpandButtonEnum.exWPlus; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/25/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.ColumnsFormatLevel = "0"; var_Chart.SelBackColor = axG2antt1.SelBackColor; var_Chart.SelForeColor = axG2antt1.SelForeColor; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("P1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.AddBar(var_Items.InsertItem(h,null,"Child 1"),"Task",Convert.ToDateTime("1/2/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Child 2"),"Task",Convert.ToDateTime("1/4/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Child 3"),"Task",Convert.ToDateTime("1/7/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1477 |
Is it possible to display the columns in the chart aligned to the right
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; var_Column.Alignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.ColumnsFormatLevel = "|,1:52"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1476 |
How can I display a border in the chart
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; var_Column.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellForeColor,255); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.ColumnsFormatLevel = "1:52,\\\"\\\"[bg=255]:2"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1475 |
How can I change the font to display the columns in the chart (Method 2)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add(1.ToString(),null); var_ConditionalFormat.Bold = true; var_ConditionalFormat.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x1; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1474 |
How can I change the font to display the columns in the chart (Method 1)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1"; var_Chart.ColumnsFont = (axG2antt1.Font as stdole.IFontDisp); stdole.IFontDisp var_StdFont = var_Chart.ColumnsFont; var_StdFont.Size = 12; var_StdFont.Name = "Tahoma"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1473 |
How can I change the column's background color when it is displayed on the chart (Method 2)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=255]:52"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1472 |
How can I change the column's background color when it is displayed on the chart (Method 1)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Key") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,0); var_Column.Visible = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellBackColor,15790320); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1:52"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Split",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1471 |
Can the chart display any column
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Start") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = EXG2ANTTLib.AlignmentEnum.LeftAlignment; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("End") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1:52,|,2:52"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1470 |
Is it possible to display a check-box column on the chart
axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Visible = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); |
1469 |
Is it possible to disable the cell's editor context menu
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exEditAllowContextMenu,false); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(10); var_Items.AddItem(20); |
1468 |
How can I find a value in a drop down editor
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("DropDownList") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor.AddItem(1,"DDList 1",null); var_Editor.AddItem(2,"DDList 2",null); var_Editor.AddItem(3,"DDList 3",null); EXG2ANTTLib.Editor var_Editor1 = (axG2antt1.Columns.Add("DropDown") as EXG2ANTTLib.Column).Editor; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DropDownType; var_Editor1.AddItem(1,"DDType 1",null); var_Editor1.AddItem(2,"DDType 2",null); var_Editor1.AddItem(3,"DDType 3",null); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(.AddItem(1),1,axG2antt1.Columns[1].Editor.get_FindItem(1)); var_Items.set_CellValue(.AddItem(2),1,axG2antt1.Columns[1].Editor.get_FindItem(2)); |
1467 |
What is the difference between DropDownType and DropDownListType
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("DropDownList") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor.AddItem(1,"First item",null); var_Editor.AddItem(2,"Second item",null); var_Editor.AddItem(3,"Third item",null); EXG2ANTTLib.Editor var_Editor1 = (axG2antt1.Columns.Add("DropDown") as EXG2ANTTLib.Column).Editor; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DropDownType; var_Editor1.AddItem(1,"First item",null); var_Editor1.AddItem(2,"Second item",null); var_Editor1.AddItem(3,"Third item",null); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,"Any"); var_Items.set_CellValue(var_Items.AddItem(2),1,"Any"); |
1466 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 3)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 32; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Appearance.Add(2,"CP:1 -2 -2 2 2"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.SelBarColor = 0x2ff0000; var_Chart.Bars["Task"].Color = 0x1000000; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); axG2antt1.EndUpdate(); |
1465 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 2)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 32; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Appearance.Add(2,"CP:1 -2 -2 2 2"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.SelBarColor = 0x2000000; var_Chart.Bars["Task"].Color = 0x1000000; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); axG2antt1.EndUpdate(); |
1464 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 1)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 32; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB" + "iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" + "YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" + "xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" + "F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA=="); var_Appearance.Add(2,"CP:1 -2 -2 2 2"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.SelBarColor = 0x2000000; var_Chart.set_PaneWidth(false,48); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); axG2antt1.EndUpdate(); |
1463 |
How can I load my table from an Access 2007, using ADO
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); axG2antt1.EndUpdate(); |
1462 |
Is it possible to enumerate the links without enumerating them
axG2antt1.AntiAliasing = true; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.AddLink("L3",h3,"K3",h4,"K4"); var_Items.set_Link("<L*>",EXG2ANTTLib.LinkPropertyEnum.exLinkShowDir,false); |
1461 |
How can I display a vertical line in the chart
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. private void axG2antt1_ClickEvent(object sender, EventArgs e) { EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.MarkNowColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Chart.MarkNow = var_Chart.get_DateFromPoint(-1,-1); } //this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("3/13/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.MarkNowColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Chart.MarkNowWidth = 3; var_Chart.UnitWidth = 32; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; |
1460 |
How can I use the MarkNowColor to mark a time line different then the time on the machine
|
1459 |
Is it possible to show the current date time using a delay
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.get_Level(0).Label = 1048576; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(1); var_Level.Label = "<%ss%>"; var_Level.Count = 15; var_Chart.MarkNowColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); var_Chart.MarkNowWidth = 3; var_Chart.MarkNowDelay = 0.00069444; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/1/2018",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); |
1458 |
What are the options to show the links between bars
axG2antt1.AntiAliasing = true; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddItem(""); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/20/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.AddLink("L3",h3,"K3",h4,"K4"); var_Items.set_Link("L3",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,1); var_Items.AddItem(""); int h5 = var_Items.AddItem("Task 5"); var_Items.AddBar(h5,"Task",Convert.ToDateTime("1/22/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/24/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K5",null); var_Items.AddLink("L4",h4,"K4",h5,"K5"); var_Items.set_Link("L4",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,2); |
1457 |
Is it possible to specify the link between bars to be a wider line
axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksWidth = 2; var_Chart.LinksColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); |
1456 |
Is it possible to create a link between the two specified bars so that the link was a straight line
axG2antt1.Columns.Add("Task"); axG2antt1.AntiAliasing = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkStyle,0); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkWidth,2); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkColor,255); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,2); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); |
1455 |
I associate the bars with my columns, Start and End, but can not get it working for bars with non-empty keys. What am I doing wrong
axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,256); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); axG2antt1.EndUpdate(); |
1454 |
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exStartDate,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exEndDate,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.NonworkingHours = 12582975; var_Chart.ShowNonworkingUnits = false; var_Chart.ShowNonworkingHours = false; var_Chart.get_Level(0).Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside | EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Chart.UnitWidth = 18; var_Chart.set_PaneWidth(true,294); var_Chart.ScrollBar = false; axG2antt1.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter; axG2antt1.EndUpdate(); |
1453 |
Is it possible to count only a specified type of bars without enumerating them
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Progress",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"P3","P3"); System.Diagnostics.Debug.Print( "K*" ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); System.Diagnostics.Debug.Print( "K* P*" ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<K* P*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); |
1452 |
How can I count or get the numbers of the bars in the chart
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); System.Diagnostics.Debug.Print( "All" ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); System.Diagnostics.Debug.Print( "A*" ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<A*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); System.Diagnostics.Debug.Print( "K*" ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); |
1451 |
Is it possible to remove only specified bars from ALL items at once
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.RemoveBar(0,"<K*>"); |
1450 |
How can I remove all bars from the chart (method 2)
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.ClearBars(0); |
1449 |
How can I remove all bars from the chart (method 1)
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.RemoveBar(0,"<*>"); |
1448 |
Is it possible to update at once a property for several bars without enumerating them
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.set_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); |
1447 |
Is it possible to update at once a property of ALL bars without enumerating them
axG2antt1.Columns.Add("Tasks"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","A2"); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); |
1446 |
How do I prevent selecting a new item when selecting a bar
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; var_Chart.SelectOnClick = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_SelectItem(var_Items.FirstVisibleItem,true); axG2antt1.EndUpdate(); |
1445 |
Is it possible to find out all incoming bars ( recursively )
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarIncomingBarsAllDebug).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1444 |
How do I find the incoming bars
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarIncomingBarsDebug).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1443 |
Is it possible to find out all incoming links ( recursively ). Incoming link is a link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarIncomingLinksAllAsString).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1442 |
How do I find the incoming links. Incoming link is link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarIncomingLinksAsString).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1441 |
Is it possible to find out all outgoing bars ( recursively )
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarOutgoingBarsAllDebug).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1440 |
How do I find the outgoing bars
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarOutgoingBarsDebug).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1439 |
Is it possible to find out all outgoing links ( recursively ). Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarOutgoingLinksAllAsString).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1438 |
How do I find the outgoing links. Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarOutgoingLinksAsString).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddLink("L1",h1,"A",h2,"B"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","C"); var_Items.AddLink("L2",h2,"B",h3,"C"); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"D","D"); var_Items.AddLink("L3",h1,"A",h4,"D"); axG2antt1.EndUpdate(); |
1437 |
How do I select a bar using the right-click
// MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,false); var_Items.set_ItemBar(axG2antt1.get_ItemFromPoint(-1,-1,c,hit),axG2antt1.Chart.get_BarFromPoint(-1,-1),EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); axG2antt1.EndUpdate(); |
1436 |
How can I add or change the padding (spaces) for captions in the control's header
axG2antt1.BeginUpdate(); (axG2antt1.Columns.Add("Padding-Left") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exHeaderPaddingLeft,18); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Padding-Right") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exHeaderPaddingRight,18); var_Column.HeaderAlignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; axG2antt1.EndUpdate(); |
1435 |
Do you have any plans to add cell spacing and cell padding to the cells
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Padding-Left") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,18); (axG2antt1.Columns.Add("No-Padding") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); (axG2antt1.Columns.Add("Empty") as EXG2ANTTLib.Column).Position = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("Item A.1"),1,"Item A.2"); var_Items.set_CellValue(var_Items.AddItem("Item B.1"),1,"Item B.2"); var_Items.set_CellValue(var_Items.AddItem("Item C.1"),1,"Item C.2"); axG2antt1.EndUpdate(); |
1434 |
Can I display somehow the filter just on the top of the list, with an editor associated to each column
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // Change event - Occurs when the user changes the cell's content. private void axG2antt1_Change(object sender, AxEXG2ANTTLib._IG2anttEvents_ChangeEvent e) { System.Diagnostics.Debug.Print( "Locked:" ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_IsItemLocked(e.item).ToString() ); EXG2ANTTLib.Column var_Column = axG2antt1.Columns[e.colIndex]; var_Column.Filter = e.newValue.ToString(); var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exPattern; axG2antt1.ApplyFilter(); } //this.axG2antt1.Change += new AxEXG2ANTTLib._IG2anttEvents_ChangeEventHandler(this.axG2antt1_Change); // MouseUp event - Occurs when the user releases a mouse button. private void axG2antt1_MouseUpEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseUpEvent e) { axG2antt1.Edit(axG2antt1.Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,0)); } //this.axG2antt1.MouseUpEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseUpEventHandler(this.axG2antt1_MouseUpEvent); axG2antt1.ColumnAutoResize = false; axG2antt1.ScrollBySingleLine = true; axG2antt1.ContinueColumnScroll = false; axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exTop,2); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.get_CellEditor(h,0).EditType = EXG2ANTTLib.EditTypeEnum.EditType; h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_ItemHeight(h,4); var_Items.set_ItemDivider(h,0); var_Items.set_SelectableItem(h,false); |
1433 |
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event. private void axG2antt1_Event(object sender, AxEXG2ANTTLib._IG2anttEvents_EventEvent e) { System.Diagnostics.Debug.Print( axG2antt1.get_EventParam(-2).ToString() ); } //this.axG2antt1.Event += new AxEXG2ANTTLib._IG2anttEvents_EventEventHandler(this.axG2antt1_Event); |
1432 |
I need to specify the start and end dates of the bar to be the same, but to keep count of the working units. Is it possible
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.ShowEmptyBars = 1; var_Chart.Bars.Add("Task:Split").Shortcut = "Task"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1431 |
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (NOT recommended for bars with exBarKeepWorkingCount ) What I can do
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.ShowEmptyBars = 1; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1430 |
I need my chart to display the end date with on day less. How can I do this (Method 2)
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,543); var_Column1.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.NonworkingDays = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1429 |
Is it possible to change the width of a specified time unit
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowInsideZoom = true; var_Chart.AllowResizeInsideZoom = false; var_Chart.InsideZoomOnDblClick = false; var_Chart.DefaultInsideZoomFormat.BackColorChart = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,255)); EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms; var_InsideZooms.SplitBaseLevel = false; var_InsideZooms.DefaultWidth = 18; EXG2ANTTLib.InsideZoom var_InsideZoom = var_InsideZooms.Add(Convert.ToDateTime("1/15/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_InsideZoom.AllowInsideFormat = false; var_InsideZoom.Width = 128; axG2antt1.EndUpdate(); |
1428 |
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 2)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowInsideZoom = true; var_Chart.AllowResizeInsideZoom = false; var_Chart.InsideZoomOnDblClick = false; var_Chart.DefaultInsideZoomFormat.BackColorChart = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms; var_InsideZooms.SplitBaseLevel = false; var_InsideZooms.DefaultWidth = 18; var_InsideZooms.Add(Convert.ToDateTime("1/15/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).AllowInsideFormat = false; axG2antt1.EndUpdate(); |
1427 |
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 1)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.MarkTodayColor = var_Chart.BackColor; var_Chart.LevelCount = 2; var_Chart.MarkSelectDateColor = 0x7fff0000; var_Chart.SelectLevel = 1; var_Chart.set_SelectDate(Convert.ToDateTime("1/15/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); axG2antt1.EndUpdate(); |
1426 |
How can I change the layout of my columns when using the exCRD
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.DefaultItemHeight = 36; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Column1") as EXG2ANTTLib.Column); var_Column.Visible = false; var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Column2") as EXG2ANTTLib.Column); var_Column1.Visible = false; var_Column1.Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; (var_Columns.Add("Column3") as EXG2ANTTLib.Column).Visible = false; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("FormatLevel") as EXG2ANTTLib.Column); var_Column2.FormatLevel = "(0/1),2"; var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellFormatLevel,var_Column2.FormatLevel); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Cell 1.1"); var_Items.set_CellValue(h,1,"Cell 1.2"); var_Items.set_CellValue(h,2,"Cell 1.3"); h = var_Items.AddItem("Cell 2.1"); var_Items.set_CellValue(h,1,"Cell 2.2"); var_Items.set_CellValue(h,2,"Cell 2.3"); axG2antt1.EndUpdate(); |
1425 |
How can I overlaid a single bar
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidGroup = "OTask"; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsNone; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Copy("Task","OTask"); var_Bar1.OverlaidGroup = "Task"; var_Bar1.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStrict | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.AddBar(h,"OTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.set_ItemBar(h,"A2",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1424 |
How can I use the exOverlaidBarsCascade, exBarOverlaidKey
// CreateBar event - Fired when the user creates a new bar. private void axG2antt1_CreateBar(object sender, AxEXG2ANTTLib._IG2anttEvents_CreateBarEvent e) { axG2antt1.Items.set_ItemBar(e.item,"newbar",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"Level0"); } //this.axG2antt1.CreateBar += new AxEXG2ANTTLib._IG2anttEvents_CreateBarEventHandler(this.axG2antt1_CreateBar); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.set_ItemBar(h,"A1",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"Level0"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.set_ItemBar(h,"A3",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"Level0"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.set_ItemBar(h,"A2",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ItemBar(h,"A2",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"Level1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); var_Items.set_ItemBar(h,"A4",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ItemBar(h,"A4",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"Level1"); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1423 |
How can I use the exOverlaidBarsStack+exOverlaidBarsStackAutoArrange
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1422 |
How can I use the exOverlaidBarsStack
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1421 |
How can I use the exOverlaidBarsIntersect
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect; var_Bar.set_Overlaid(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect,"Progress"); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1420 |
How can I use the exOverlaidBarsOffset
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%9%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Default"); int h = var_Items.AddItem("Overlaid"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A4",null); h1 = var_Items.AddItem("Default"); axG2antt1.EndUpdate(); |
1419 |
Is it possible to specify the end of the project when using the SchedulePDM method
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"FS"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"SS"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos,0); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMScheduleType,2); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMScheduleDate,Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.SchedulePDM(0,"K1"); axG2antt1.EndUpdate(); |
1418 |
Is it possible to specify the start of the project when using the SchedulePDM method
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"FS"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"SS"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos,0); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMScheduleType,1); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMScheduleDate,Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.SchedulePDM(0,"K1"); axG2antt1.EndUpdate(); |
1417 |
How can I change the caption or the addition information being displayed in the Zoom-OnFly view
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exHour,"<font ;5><b><%h%><br><%AM/PM%></b></font>"); var_Chart.ZoomOnFlyCaption = "<br><c><b><font ;12><%=%C0 + ' / <fgcolor=00FF00>' + %3%></font></fgcolor></b><br><solidline><upline><b>Start</b>:<%=%1%><br><b" + ">End</b>:<%=%2%><br><b>Duration</b>:<%=round(%2-%1) + ' days'%><br><b>Working</b>:<%='<b>' + int(%258) + '</b> days' + (0:=(%258" + " - int(%258)) ? (' <fgcolor=FF0000><b>' + round(24 * =:0) + '</b> hours') : '') %>"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1416 |
How can I change the scale in the Zoom-OnFly view
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exHour,"<font ;5><b><%h%><br><%AM/PM%></b></font>"); var_Chart.ZoomOnFlyCaption = ""; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1415 |
Is it possible to change the Zoom-OnFly view's background color
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; var_Chart.BackColorZoomOnFly = (uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1414 |
How can I include the selected items in the Zoom-OnFly view
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFlyIncludeSelectedItems | EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; var_Chart.SelBackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240)); var_Chart.SelectOnClick = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.set_SelectItem(h,true); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2","T2"); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1413 |
Is it possible to include the neighbors items in the Zoom-OnFly view
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFlyIncludeNeighborItems | EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1412 |
How can I enable the Zoom-OnFly view
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("11/5/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exWeek; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowZoomOnFly = EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly; var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/17/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/24/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); h = var_Items.AddItem(null); var_Items.AddBar(h,"",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); var_Items.set_SelectableItem(h,false); axG2antt1.EndUpdate(); |
1411 |
I am using the overlay bars on stack, can I somehow tell a type of bar, or a specific bar, to be always on top of all other’s. Like a Z-Index or something
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1","A1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3","A3"); var_Items.set_ItemBar(h,"A3",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A31","A31"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3","A3"); var_Items.set_ItemBar(h,"A3",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddBar(var_Items.AddItem(null),"",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,"The <b>Key</b> of the bar specifies the Z-Order when overlaying."); axG2antt1.EndUpdate(); |
1410 |
Is it possible to specify the z-order when using the overlaying feature
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.NonworkingDays = 0; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/17/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","K1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","K2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","K3"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1","T1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2","T2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3","T3"); var_Items.set_ItemBar(0,"<T*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); var_Items.set_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"A"); var_Items.set_ItemBar(0,"<T*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey,"B"); axG2antt1.EndUpdate(); |
1409 |
I seen that there is no exBarStartColor, exBarEndColor, similar to exBarColor, is there any solution so I can display a different Start/End Color
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Copy("Summary","Aka1"); var_Bar.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bar.EndColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Copy("Summary","Aka2"); var_Bar1.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); var_Bar1.EndColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,255)); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B1",null); var_Items.set_ItemBar(h,"B1",EXG2ANTTLib.ItemBarPropertyEnum.exBarName,"Aka1"); h = var_Items.AddItem("Item B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B2",null); var_Items.set_ItemBar(h,"B2",EXG2ANTTLib.ItemBarPropertyEnum.exBarName,"Aka2"); axG2antt1.EndUpdate(); |
1408 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.set_HTMLPicture("p1","c:\\exontrol\\images\\card.png"); axG2antt1.set_HTMLPicture("p2","c:\\exontrol\\images\\sun.png"); axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragCopySnapShot; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exThinLine; axG2antt1.ShowFocusRect = false; axG2antt1.DefaultItemHeight = 26; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Color = 0x1000000; var_Bar.Height = 18; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("<img>p1:32</img>Group 1"); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); var_Items.set_ItemDivider(h,0); var_Items.set_ItemBold(h,true); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L2"); h = var_Items.AddItem("<img>p2:32</img>Group 2"); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); var_Items.set_ItemBold(h,true); var_Items.set_ItemDivider(h,0); h1 = var_Items.InsertItem(h,null,"Task"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1407 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
axG2antt1.BeginUpdate(); axG2antt1.set_HTMLPicture("p1","c:\\exontrol\\images\\card.png"); axG2antt1.set_HTMLPicture("p2","c:\\exontrol\\images\\sun.png"); axG2antt1.Chart.set_PaneWidth(true,0); object var_HTMLPicture = axG2antt1.get_HTMLPicture("aka1"); axG2antt1.HeaderHeight = 24; axG2antt1.DefaultItemHeight = 48; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.GridLineColor = Color.FromArgb(240,240,240); axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Columns[0].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); axG2antt1.Columns[0].FormatColumn = "value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"; axG2antt1.Columns[0].Width = 112; axG2antt1.Columns[1].set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,1); axG2antt1.Columns[2].LevelKey = "1"; axG2antt1.Columns[3].LevelKey = "1"; axG2antt1.Columns[4].LevelKey = "1"; axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragCopyImage; axG2antt1.SingleSel = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items[1]; var_Items.set_SelectItem(h,true); h = var_Items[2]; var_Items.set_SelectItem(h,true); h = var_Items[3]; var_Items.set_SelectItem(h,true); var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exBottom,1); h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exBottom,0); var_Items.set_CellValue(h,1,"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ..."); var_Items.set_CellSingleLine(h,1,EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap); var_Items.set_CellValueFormat(h,1,EXG2ANTTLib.ValueFormatEnum.exHTML); var_Items.set_CellHAlignment(h,1,EXG2ANTTLib.AlignmentEnum.CenterAlignment); var_Items.set_ItemDivider(h,1); var_Items.set_ItemDividerLineAlignment(h,EXG2ANTTLib.DividerAlignmentEnum.DividerTop); axG2antt1.EndUpdate(); |
1406 |
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text
|
1405 |
Is it possible to change the indentation during the drag and drop
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exSolidLine; axG2antt1.HasButtons = EXG2ANTTLib.ExpandButtonEnum.exWPlus; axG2antt1.ShowFocusRect = false; axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.Bars["Task"].Color = 0x1000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Group 1"); var_Items.set_ItemBold(h,true); var_Items.set_ItemDivider(h,0); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.InsertItem(h1,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/17/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); h2 = var_Items.InsertItem(h1,null,"Task 3"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L2"); var_Items.set_ExpandItem(h,true); var_Items.set_ExpandItem(h1,true); h = var_Items.AddItem("Group 2"); var_Items.set_ItemBold(h,true); var_Items.set_ItemDivider(h,0); var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exBottom,1); h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exBottom,0); var_Items.set_CellValue(h,0,"Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the i" + "ndentation."); var_Items.set_CellSingleLine(h,0,EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); axG2antt1.EndUpdate(); |
1404 |
Is it possible to allow moving an item to another, but keeping its indentation
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionKeepIndent; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exThinLine; axG2antt1.ShowFocusRect = false; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; var_Chart.Bars["Task"].Color = 0x1000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Group 1"); var_Items.set_ItemDivider(h,0); var_Items.set_ItemBold(h,true); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Group 2"); var_Items.set_ItemBold(h,true); var_Items.set_ItemDivider(h,0); axG2antt1.EndUpdate(); |
1403 |
How can I change the row's position to another, by drag and drop. Is it possible
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPosition; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; var_Chart.Bars["Task"].Color = 0x1000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L2"); axG2antt1.EndUpdate(); |
1402 |
Is it possible to scroll the control's content by clicking and moving the mouse up or down
|
1401 |
How can I display bars so they fit the entire height ( height of the row )
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.DefaultItemHeight = 36; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.UnitWidth = 48; var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.NonworkingHours = 16253183; var_Chart.ShowNonworkingUnits = false; var_Chart.UnitWidth = 16; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2012 8:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.Bars.Add("Empty").Pattern = EXG2ANTTLib.PatternEnum.exPatternEmpty; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside | EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Label = "<%d2%>"; var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.BarsAllowSizing = false; var_Chart.AllowSelectObjects = EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("CA") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("CB") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Address 1.1<br>Line 2.1<br>C1"); var_Items.set_ItemMaxHeight(h,96); var_Items.set_CellValue(h,1,"Address 1.2<br>Line 2.2<br>C2"); var_Items.AddBar(h,"Empty",Convert.ToDateTime("1/2/2012 8:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2012 19:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","This is a bit of text<br>being <font ;9>displayed ion the <b>bar A"); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,16777471); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,2); var_Items.AddBar(h,"Empty",Convert.ToDateTime("1/3/2012 8:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/3/2012 19:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","<fgcolor=FFFFFF>This is a bit of text<br><fgcolor=FFFFFF>being <font ;9>displayed ion the <b>bar B"); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,33488896); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,2); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,0); var_Items.AddBar(h,"Empty",Convert.ToDateTime("1/4/2012 8:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2012 19:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C","<font Tahoma;12><b>bar C"); var_Items.set_ItemBar(h,"C",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,33489151); axG2antt1.EndUpdate(); |